package cn.sjtu.design_pattern.factory.simple_factory;

/**
 * @author syo 2319615164@qq.com
 * @description 支付服务工厂
 * @date 2024/5/16
 * @Copyright syo
 */
public class PayServiceFactory {
    public static PayService getPayService(int type) {
        if (type == 0) {
            return new WeChatPayService();
        } else if (type == 1) {
            return new AliPayService();
        } else {
            return null;
        }
    }
}
